package com.xingkeduo.model.bo;

import com.xingkeduo.util.pojo.base.BaseEnum;

/**
 * @Description TODO
 * @Date 2019/4/1 14:19
 * @Created 情绪十分不稳定的Shadow
 */
public enum AttendanceWorkStatusEnum implements BaseEnum {

    LATE_TIME(1,"迟到"),
    LEAVE_EARLY_TIME(2,"早退"),
    LATE_LEAVE_EARLY_TIME(3,"迟到/早退"),
    ABSENTEEISM_TIME(4,"旷工"),
    NORMAL_TIME(5,"正常打卡");

    private int value;
    private String desc;

    private AttendanceWorkStatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public static AttendanceWorkStatusEnum getAttendanceWorkStatus(int value) {
        AttendanceWorkStatusEnum[] attendanceWorkStatusEnums = values();

        for (int i = 0; i < attendanceWorkStatusEnums.length; ++i) {
            if (attendanceWorkStatusEnums[i].getValue() == value) {
                return attendanceWorkStatusEnums[i];
            }
        }

        return null;
    }


    @Override
    public int getValue() {
        return this.value;
    }

    public String getDesc(){
        return this.desc;
    }
}
